﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class tesst : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
    {
      
    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        StudentClassesDataContext db = new StudentClassesDataContext();
        test test = new test();
        test.name = TextBox1.Text;
        test.password = TextBox2.Text;
        test.good = TextBox3.Text;
        db.test.InsertOnSubmit(test);
        try
        {
            db.SubmitChanges();

        }catch (Exception)
        {
            Response.Write("you do not do this!!!");
        }
                GridView1.DataBind();
    }

    protected void GridView1_SelectedIndexChanged1(object sender, EventArgs e)
    {
        Response.Write(GridView1.SelectedValue);
    }
}